package com.codenum.codegenerator;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
* the Hqjvrflu type
*/
@SuppressWarnings("ALL")
public class Hqjvrflu {


        private static volatile Hqjvrflu instance;

        /**
        * 方法MethodMap
        */
        private Map<String, Method> methodMap = new HashMap<>(32);

        private Map<String, Object> saleTypeMap = new HashMap<>(64);

        public static Hqjvrflu getInstance() {
            if (instance == null) {
                synchronized (Hqjvrflu.class) {
                    if (instance == null) {
                        instance = new Hqjvrflu();
                    }
                }
            }
            return instance;
        }


        private Hqjvrflu() {

        }



    public  Boolean judgeFbhysottzb(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeSopzenfgoe(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeDslxawuhgd(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeRzlzyapudn(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeFsxfixnynj(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgePjvnesomca(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeQcxonedwsj(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeEtcupbggjw(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeGuytrxxfbb(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeAjlnvjmpts(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeTkjhkjclaq(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeKdexnbgycl(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeBfuatpdymb(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }

    private String  fbhysottzb;
    private String  sopzenfgoe;
    private String  dslxawuhgd;
    private String  rzlzyapudn;
    private String  fsxfixnynj;
    private String  pjvnesomca;
    private String  qcxonedwsj;
    private String  etcupbggjw;
    private String  guytrxxfbb;
    private String  ajlnvjmpts;
    private String  tkjhkjclaq;
    private String  kdexnbgycl;
    private String  bfuatpdymb;


    public void setFbhysottzb(String fbhysottzb){
    this.fbhysottzb = fbhysottzb;
    }

    public String getFbhysottzb(){
    return this.fbhysottzb;
    }
    public void setSopzenfgoe(String sopzenfgoe){
    this.sopzenfgoe = sopzenfgoe;
    }

    public String getSopzenfgoe(){
    return this.sopzenfgoe;
    }
    public void setDslxawuhgd(String dslxawuhgd){
    this.dslxawuhgd = dslxawuhgd;
    }

    public String getDslxawuhgd(){
    return this.dslxawuhgd;
    }
    public void setRzlzyapudn(String rzlzyapudn){
    this.rzlzyapudn = rzlzyapudn;
    }

    public String getRzlzyapudn(){
    return this.rzlzyapudn;
    }
    public void setFsxfixnynj(String fsxfixnynj){
    this.fsxfixnynj = fsxfixnynj;
    }

    public String getFsxfixnynj(){
    return this.fsxfixnynj;
    }
    public void setPjvnesomca(String pjvnesomca){
    this.pjvnesomca = pjvnesomca;
    }

    public String getPjvnesomca(){
    return this.pjvnesomca;
    }
    public void setQcxonedwsj(String qcxonedwsj){
    this.qcxonedwsj = qcxonedwsj;
    }

    public String getQcxonedwsj(){
    return this.qcxonedwsj;
    }
    public void setEtcupbggjw(String etcupbggjw){
    this.etcupbggjw = etcupbggjw;
    }

    public String getEtcupbggjw(){
    return this.etcupbggjw;
    }
    public void setGuytrxxfbb(String guytrxxfbb){
    this.guytrxxfbb = guytrxxfbb;
    }

    public String getGuytrxxfbb(){
    return this.guytrxxfbb;
    }
    public void setAjlnvjmpts(String ajlnvjmpts){
    this.ajlnvjmpts = ajlnvjmpts;
    }

    public String getAjlnvjmpts(){
    return this.ajlnvjmpts;
    }
    public void setTkjhkjclaq(String tkjhkjclaq){
    this.tkjhkjclaq = tkjhkjclaq;
    }

    public String getTkjhkjclaq(){
    return this.tkjhkjclaq;
    }
    public void setKdexnbgycl(String kdexnbgycl){
    this.kdexnbgycl = kdexnbgycl;
    }

    public String getKdexnbgycl(){
    return this.kdexnbgycl;
    }
    public void setBfuatpdymb(String bfuatpdymb){
    this.bfuatpdymb = bfuatpdymb;
    }

    public String getBfuatpdymb(){
    return this.bfuatpdymb;
    }

    void setMethodMap(Map<String, Method> methodMap) {
        this.methodMap = methodMap;
    }

   void setSaleTypeMap(Map<String, Object> saleTypeMap) {
        this.saleTypeMap = saleTypeMap;
    }

    public Boolean judgeAttributeValue(String saleType, String methodName) {
        try {
            Object saleTypeObject = saleTypeMap.get(saleType);
            String targetMethod = methodName.replace("judge", "get");
            String attr = methodName.replace("judge", "");
            Method method = methodMap.get(targetMethod);
            Object invoke = method.invoke(saleTypeObject);
            return Objects.isNull(invoke) ? Boolean.FALSE : Objects.equals(invoke.toString().toLowerCase(), attr.toLowerCase());
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e.getMessage());
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e.getMessage());
        }
    }

}